package com.ybkj.chat.module.dynamic.activity;

import android.support.v7.widget.StaggeredGridLayoutManager;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.ybkj.chat.R;
import com.ybkj.chat.base.BaseMvpActivity;
import com.ybkj.chat.manager.ActivityManager;
import com.ybkj.chat.ui.adapter.StaggerVideoAdapter;
import com.ybkj.chat.ui.view.recyclerview.XRecyclerView;
import com.ybkj.chat.utils.ResourcesUtil;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * author : ywh
 * date : 2019/2/26 17:07
 * description :附近的人详情视频
 */
public class NearByPeopleVideoActivity extends BaseMvpActivity {
    //视频列表
    @BindView(R.id.video_recycler)
    XRecyclerView videoRecycler;

    private StaggerVideoAdapter staggerVideoAdapter;

    @Override
    protected void injectPresenter() {

    }

    @Override
    protected void initTitle() {
        setTitleText("视频");
        setBackImgVisibility(View.VISIBLE);
        setRightImg(ResourcesUtil.getDrawable(R.drawable.common_nav_btn_more_gray));
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_nearby_video;
    }

    @Override
    protected void initView() {
        videoRecycler.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL));
        staggerVideoAdapter = new StaggerVideoAdapter(mContext);
        staggerVideoAdapter.addData("1");
        staggerVideoAdapter.addData("1");
        staggerVideoAdapter.addData("1");
        staggerVideoAdapter.addData("1");
        staggerVideoAdapter.addData("1");
        staggerVideoAdapter.addData("1");
        staggerVideoAdapter.addData("1");
        staggerVideoAdapter.bindToRecyclerView(videoRecycler);

        staggerVideoAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
            @Override
            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
                ActivityManager.gotoActivity(mContext, VideoDetailsActivity.class);
            }
        });
    }

    @Override
    protected void initData() {

    }

    @OnClick(R.id.dialogue)
    public void onViewClicked() {
    }
}
